<?php
namespace Xiaoc\Api;

use PhalApi\Api;

/**
 * 微信支付
 *
 * @author: zhy <zhy302813@163.com> 2017-8-19
 */

class Site extends Api {

	public function getRules() {
        return array(
            'index' => array(
                'username' 	=> array('name' => 'username', 'default' => 'PHPer', ),
            ),
        );
	}
	
	/**
	 * 微信回调
	 * @desc 微信回调默认地址
	 */
	public function index() {
        return array(
            'title' => 'Hello World!',
            'content' => \PhalApi\T('Hi {name}, welcome to use PhalApi!', array('name' => $this->username)),
            'version' => PHALAPI_VERSION,
            'time' => $_SERVER['REQUEST_TIME'],
        );
	}
}
